<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <div id="app">
        <my-component></my-component>
        <my-component></my-component>
        <my-component></my-component>
    </div>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>
        var data = {
            counter: 0
        }

        Vue.component('my-component', {
            template: '<button @click="counter++">{{ counter++ }}</button>',
            data(){
                return data;
            }
        });

        let app = new Vue({
            el: '#app'
        })
    </script>
</body>

</html>